package org.jpropelleralt.jview;

import org.jpropelleralt.jview.factory.JViewFactory;
import org.jpropelleralt.jview.factory.impl.JViewFactoryDefault;
import org.jpropelleralt.jview.icon.IconFactory;
import org.jpropelleralt.jview.icon.impl.MinimalIconFactory;

/**
 * System-wide settings and utils for {@link JView}s
 */
public class JViews {

	private static IconFactory iconFactory = new MinimalIconFactory();
	private static JViewFactory jViewFactory = new JViewFactoryDefault();
	
	/**
	 * Get the system-wide {@link IconFactory}
	 * @return
	 * 		The {@link IconFactory}
	 */
	public static IconFactory getIconFactory() {
		return iconFactory;
	}

	/**
	 * Set the system-wide {@link IconFactory}
	 * @param factory		The new {@link IconFactory}
	 */
	public static void setIconFactory(IconFactory factory) {
		iconFactory = factory;
	}
	
	/**
	 * Get the system-wide {@link JViewFactory}
	 * @return
	 * 		The {@link JViewFactory}
	 */
	public static JViewFactory getJViewFactory() {
		return jViewFactory;
	}

	/**
	 * Set the system-wide {@link JViewFactory}
	 * @param factory		The new {@link JViewFactory}
	 */
	public static void setJViewFactory(JViewFactory factory) {
		jViewFactory = factory;
	}
}
